﻿@* Generator: Template
    GeneratePrettyNames : true *@
@functions{
    public NFinal.Compile.Template.ASPXAutoCompleteModel Model { get; set; }
}
//======================================================================
//
//        Copyright : Zhengzhou Strawberry Computer Technology Co.,LTD.
//        All rights reserved
//        
//        Application:NFinal MVC framework
//        Filename :{$aspxPageClassName}.cs
//        Description :模板提示类
//
//        created by Lucas at  2015-6-30`
//     
//        WebSite:http://www.nfinal.com
//
//======================================================================
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace @{@Model.aspxPageNameSpace}
{
    public partial class @{@Model.aspxPageClassName} : System.Web.UI.@{@Model.BaseClassName}
    {
		//数据库模型
        @{@Model.StructDatas}
		//函数内变量
        public class @{@Model.aspxPageClassName}_AutoComplete:@{@Model.baseName}
        {
			/*参数变量*/
			@foreach(var parameterData in Model.parameterDataList) {
                if (parameterData.isArray) {
                    @:/// <summary>
                    @:/// @{@parameterData.parameterCommit}
                    @:/// </summary>
                    @:public @{@parameterData.type}[] @{@parameterData.name};
				}else{
					@:/// <summary>
					@:/// @{@parameterData.parameterCommit}
					@:/// </summary>
					@:public @{@parameterData.type} @{@parameterData.name};
				}
			}
			/*数据库变量*/
			@foreach (var functionData in Model.functionDataList) {
                if (functionData.type == "var") {
					@:/// <summary>
					@:/// @{@functionData.varCommit}
					@:/// </summary>
					if (functionData.functionName == "Delete") {
                        @:public int @{@functionData.varName};
					}
                    if (functionData.functionName == "ExecuteNonQuery") {
                        @:public int @{@functionData.varName};
					}
                    if (functionData.functionName == "Insert") {
                        @:public int @{@functionData.varName};
                    }
                    if (functionData.functionName == "Page") {
                        @:public List<__@{@Model.methodName}_@{@functionData.varName}__> @{@functionData.varName};
					}
                    if (functionData.functionName == "QueryAll") {
                        @:public List<__@{@Model.methodName}_@{@functionData.varName}__> @{@functionData.varName};
					}
                    if (functionData.functionName == "QueryObject") {
                        @:public @{@functionData.type} @{@functionData.varName};
					}
                    if (functionData.functionName == "QueryRandom") {
                        @:public List<__@{@Model.methodName}_@{@functionData.varName}__> @{@functionData.varName};
					}
                    if (functionData.functionName == "QueryTop") {
                        @:public List<__@{@Model.methodName}_@{@functionData.varName}__> @{@functionData.varName};
					}
                    if (functionData.functionName == "QueryRow") {
                        @:public __@{@Model.methodName}_@{@functionData.varName}__ @{@functionData.varName};
					}
                    if (functionData.functionName == "Update") {
                        @:public int @{@functionData.varName};
					}
                }
            }
			/*一般变量*/
			@foreach(var csharpDeclaration in Model.csharpDeclarationList) {
                @:/// <summary>
                @:/// @{@csharpDeclaration.comment}
                @:/// </summary>
                    @:public @{@csharpDeclaration.typeName} @{@csharpDeclaration.varName};
			}
			/*DAL函数声明变量*/
        }
		/// <summary>
		/// 变量提示类,用于自动完成.
		/// </summary>
        public @{@Model.aspxPageClassName}_AutoComplete ViewBag = new @{@Model.aspxPageClassName}_AutoComplete();
    }
}